package com.bdqn.crm.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * @TableName sys_role_right
 */
@TableName(value = "sys_role_right")
@Data
public class SysRoleRight implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long rfId;

    /**
     *
     */
    private Long rfRoleId;

    /**
     *
     */
    private String rfRightCode;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysRoleRight other = (SysRoleRight) that;
        return (this.getRfId() == null ? other.getRfId() == null : this.getRfId().equals(other.getRfId()))
                && (this.getRfRoleId() == null ? other.getRfRoleId() == null : this.getRfRoleId().equals(other.getRfRoleId()))
                && (this.getRfRightCode() == null ? other.getRfRightCode() == null : this.getRfRightCode().equals(other.getRfRightCode()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRfId() == null) ? 0 : getRfId().hashCode());
        result = prime * result + ((getRfRoleId() == null) ? 0 : getRfRoleId().hashCode());
        result = prime * result + ((getRfRightCode() == null) ? 0 : getRfRightCode().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rfId=").append(rfId);
        sb.append(", rfRoleId=").append(rfRoleId);
        sb.append(", rfRightCode=").append(rfRightCode);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}